https://leetcode.cn/problems/minimum-size-subarray-sum/
//滑动数组
class Solution {
public:
    int minSubArrayLen(int target, vector<int>& nums) {
        int left=0,right=0;
        int sum=0;
        int len=INT_MAX;
        while(right<nums.size())
        {
            sum+=nums[right];
            while(sum>=target)
            {
                len=min(len,right-left+1);
                sum-=nums[left++];
            }
            right++;
        }
        if(len!=INT_MAX)
        return len;
        else
        return 0;
    }
};